Skip to content

Install the package from the build context in the Docker image - #99

Merged
kk7ds merged 1 commit into
kk7ds:masterfrom
chrodriguez:fix/docker-build-from-source
Nov 10, 2026
Merged

kk7ds merged 1 commit into
kk7ds:masterfrom
chrodriguez:fix/docker-build-from-source

Conversation

@chrodriguez

Copy link
Copy Markdown
Contributor

Install pynx584 from the build context in the Docker image

The Dockerfile installed pynx584 from PyPI, so the image never contained the code of the commit it was built from. PyPI has 0.9.0 only, so the image published as 0.10.0 runs 0.9.0 (/version answers 1.2 and /system answers 404).

This change copies setup.py, nx584_server, nx584_client and nx584/ into the image and runs pip install /src.

Tested with a local build from 0.10.0: pip show pynx584 reports 0.10.0, /version answers 1.3 and /system answers 200.

Note: latest is built from master, so after this change it carries the current master code instead of the last PyPI release. Please confirm that this is acceptable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@chrodriguez

Copy link
Copy Markdown
Contributor Author

After merge, the published 0.10.0 and 0.10 images still contain 0.9.0, because the workflow builds from the tag and the tag points to a commit without this fix. Two options:

  1. Move the 0.10.0 tag to the merge commit and push it again. The package code does not change (this PR touches only the Dockerfile), so this rebuilds the images with the right content.
  2. Tag a 0.10.1 release instead.

Either works for me. Since 0.10.0 is not on PyPI yet, option 1 seems simplest. A PyPI upload of the same release would also help, because Home Assistant installs pynx584 from PyPI.

@kk7ds

kk7ds commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Makes sense to me to install from the tag and not pypi because the pypi release doesn't have the actual docker build stuff in it anyway. The point is that there's a race between pushing to pypi, it being available as the top version and pushing the tag to git right? Either way, building from the tag commit is the safest thing to make sure image X has code X in it, IMHO.

That said, I don't understand option 1.. the tag is on the top-most commit AFAICT, no merge commit that is higher or anything.

Am I good to just merge this?

@chrodriguez

Copy link
Copy Markdown
Contributor Author

Yes, please merge.

Sorry, option 1 was not clear. Simpler: after the merge, bump setup.py to 0.10.1 and tag 0.10.1. That publishes a 0.10.1 image with the right code. The existing 0.10.0 image still contains 0.9.0, so it is best ignored (or deleted).

If you can also upload 0.10.1 to PyPI, that would help: Home Assistant installs pynx584 from PyPI.

@kk7ds

kk7ds commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Ah right, okay. For some reason last night I was reading 1 and 2 as alternatives to merging this.

@kk7ds
kk7ds merged commit 1bd5f83 into kk7ds:master Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants